Skip to content

Upgrade clang-format to v22 and improve pylint pre-commit configuration#2813

Merged
antonwolfy merged 7 commits intomasterfrom
update-pre-commit-checks
Mar 18, 2026
Merged

Upgrade clang-format to v22 and improve pylint pre-commit configuration#2813
antonwolfy merged 7 commits intomasterfrom
update-pre-commit-checks

Conversation

@antonwolfy
Copy link
Contributor

Summary

  • Migrate clang-format from pocc/pre-commit-hooks to pre-commit/mirrors-clang-format v22.1.0
  • Update .clang-format config to maintain consistent code style across versions
  • Configure pylint to properly handle C extension modules (numpy, dpctl)
  • Remove manual clang-format-12 installation from GitHub workflow
  • Reformat all C++ files with clang-format v22
  • Add reformatting commit to .git-blame-ignore-revs

Changes

Pre-commit configuration

  • Switch to pre-commit/mirrors-clang-format (v22.1.0) for better version pinning and consistency across environments
  • Add --disable=c-extension-no-member to pylint to avoid false positives on C extension objects

Code style

  • Update .clang-format: Set AfterControlStatement: Never to preserve existing brace placement style
  • Reformat all C++ source files with clang-format v22 (net -159 lines due to template parameter formatting improvements)

Pylint configuration

  • Add extension-pkg-allow-list = ["numpy"] to help pylint understand numpy better
  • Add generated-members patterns to handle dynamically created attributes on numpy types

CI/CD

  • Remove obsolete apt-get install clang-format-12 step from pre-commit workflow

@antonwolfy antonwolfy added this to the 0.20.0 release milestone Mar 11, 2026
@antonwolfy antonwolfy self-assigned this Mar 11, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

Array API standard conformance tests for dpnp=0.20.0dev4=py313h509198e_15 ran successfully.
Passed: 1356
Failed: 1
Skipped: 16

@coveralls
Copy link
Collaborator

coveralls commented Mar 11, 2026

Coverage Status

coverage: 81.384% (+0.2%) from 81.17%
when pulling 32e653d on update-pre-commit-checks
into cba3d51 on master.

@antonwolfy antonwolfy marked this pull request as ready for review March 11, 2026 14:18
Copy link
Contributor

@vlad-perevezentsev vlad-perevezentsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @antonwolfy

@antonwolfy antonwolfy merged commit 21d5e1a into master Mar 18, 2026
60 of 70 checks passed
@antonwolfy antonwolfy deleted the update-pre-commit-checks branch March 18, 2026 19:34
github-actions bot added a commit that referenced this pull request Mar 18, 2026
…ration (#2813)

## Summary

- Migrate clang-format from `pocc/pre-commit-hooks` to
`pre-commit/mirrors-clang-format` v22.1.0
- Update `.clang-format` config to maintain consistent code style across
versions
- Configure pylint to properly handle C extension modules (numpy, dpctl)
- Remove manual clang-format-12 installation from GitHub workflow
- Reformat all C++ files with clang-format v22
- Add reformatting commit to `.git-blame-ignore-revs`

## Changes

### Pre-commit configuration
- Switch to `pre-commit/mirrors-clang-format` (v22.1.0) for better
version pinning and consistency across environments
- Add `--disable=c-extension-no-member` to pylint to avoid false
positives on C extension objects

### Code style
- Update `.clang-format`: Set `AfterControlStatement: Never` to preserve
existing brace placement style
- Reformat all C++ source files with clang-format v22 (net -159 lines
due to template parameter formatting improvements)

### Pylint configuration
- Add `extension-pkg-allow-list = ["numpy"]` to help pylint understand
numpy better
- Add `generated-members` patterns to handle dynamically created
attributes on numpy types

### CI/CD
- Remove obsolete `apt-get install clang-format-12` step from pre-commit
workflow 21d5e1a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants